package com.springboot.springboot_two.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ResultVo<T> {
    private Integer code;
    private String message;
    private T data;

    public static<T> ResultVo<T> success(String mess,T data){
        return new ResultVo<T>(200,mess,data);
    }

    public static<T> ResultVo<T> error(String mess){
        return new ResultVo<T>(500,mess,null);
    }
}
